<!--%import("filter/check_attendance_data.xml")-->
<!--%import("filter/delete_attendance_data.xml")-->
<!--%import("filter/fix_attendance_data.xml")-->
<!--//일별 출석여부 출력 -->

<!--//선택한 회원의 출석정보 재생성-->
<form action="./" method="POST" onsubmit="return procFilter(this, fix_attendance_data);" id="fixAttendanceData">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="" />
<input type="hidden" name="member_srl" value ="" />
<input type="hidden" name="count" value ="" />
</form>

<!--//검색상자-->
<form action="./" method="get" class="adminSearch">
<input type="hidden" name="mid" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="{$selected_date}" />
{@$year_month = substr($selected_date, 0,6)}
    <fieldset>
        <select name="selected_group_srl">
            <option value="0">{$lang->group}</option>
            <!--@foreach($group_list as $key => $val)-->
            <option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
            <!--@end-->
        </select>
        <select name="search_target">
            <option value="" <!--@if(!$search_target)-->selected="selected"<!--@end-->>{$lang->search_target}</option>
            <option value="email_address" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->email}</option>
            <option value="user_id" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->user_id}</option>
            <!--option value="user_name" <!--@if($search_target=='user_name')-->selected="selected"<!--@end-->>{$lang->user_name}</option-->
            <option value="nick_name" <!--@if($search_target=='nick_name')-->selected="selected"<!--@end-->>{$lang->nick_name}</option>
        </select>
        <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
        <span class="button"><input type="submit" value="{$lang->cmd_search}" /></span>
        <a href="#" onclick="location.href='{getUrl('','type',$type,'act',$act,'module',$module)}';return false;" class="button"><span>{$lang->cmd_cancel}</span></a>
    </fieldset>
</form>

<form id="attendanceMode" action="./" method="post">
    <input type="hidden" name="module" value="{$module}" />
    <input type="hidden" name="act" value="{$act}" />
    <input type="hidden" name="page" value="{$page}" />
    <input type="hidden" name="type" value="{$type}" />
    <input type="hidden" name="selected_date" value="{$selected_date}" />
    <input type="hidden" name="check_day" value=""/>
    <input type="hidden" name="member_srl" value ="" />
</form>
<table cellspacing="0" class="attendanceTable">
    <col align="center" />
        <tr>
            <th class="center">
                {$lang->nick_name}
            </th>
            <td class="center">
                {$lang->user_id}
            </td>
            <!--th class="center">
                {$lang->user_name}
            </th-->
            <!--@for($j=1;$j<=$end_day;$j++)-->
            <td class="center">
                <!--@if($j == $day)--><U>{$j}</U><!--@else-->{$j}<!--@end-->
            </td>
            <!--@end-->
        </tr>
    <!--@foreach($user_data->data as $val2)-->
    <tr>
        <th class="center"> 
            {@$user_info = $oMemberModel->getMemberInfoByMemberSrl($val2->member_srl)}<div class="member_{$user_info->member_srl}">{$user_info->nick_name}</div>
        </th>
        <td class="center"> 
            {$user_info->user_id}
        </td>
        <!--th class="center"> 
            {$user_info->user_name}
        </th-->
        <!--@for($j=1;$j<=$end_day;$j++)-->
        <td class="dotted">
            {@$check_day=sprintf("%s%02d",$year_month,$j)}
            {@$check =$Model->getAttendanceData($val2->member_srl,$check_day) }
            {@$check_error = $Model->getIsCheckedA($val2->member_srl, $check_day)}
            <!--@if($check_error>=2)-->
                    <strong><a href="#fixAttendanceData" onclick="att_fix_attendance_data('{$val2->member_srl}','{$check_error}','{$check_day}','{$lang->attend_fix_att}','{$user_info->nick_name}');">?</a></strong>
	            <!--@elseif($check)-->
                    <a href="#uncheck" onclick="att_toggleStatus(0, '{$val2->member_srl}', '{$check_day}');">●</a>
	            <!--@elseif(!$check)-->
		            <a href="#check" onclick="att_toggleStatus(1, '{$val2->member_srl}', '{$check_day}');">×</a>
	            <!--@end-->
        </td>
        <!--@end-->
    </tr>
    <!--@end-->
</table>
        </form>
<!--//페이지 네비게이션-->
<div class="pagination a1">
   <a href="{getUrl('page','','module_srl','')}" class="prevEnd">{$lang->first_page}</a> 
    <!--@while($page_no = $user_data->page_navigation->getNextPage())-->
        <!--@if($user_data->page == $page_no)-->
            <strong>{$page_no}</strong> 
        <!--@else-->
            <a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a> 
        <!--@end-->
    <!--@end-->
    <a href="{getUrl('page',$user_data->page_navigation->last_page,'module_srl','')}" class="nextEnd">{$lang->last_page}</a>
</div>

<!--//검색상자-->
<form action="./" method="get" class="adminSearch">
<input type="hidden" name="mid" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="selected_date" value="{$selected_date}" />

    <fieldset>
        <select name="selected_group_srl">
            <option value="0">{$lang->group}</option>
            <!--@foreach($group_list as $key => $val)-->
            <option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
            <!--@end-->
        </select>
        <select name="search_target">
		<option value="" <!--@if(!$search_target)-->selected="selected"<!--@end-->>{$lang->search_target}</option>
        <option value="email_address" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->email}</option>
		<option value="user_id" <!--@if($search_target=='user_id')-->selected="selected"<!--@end-->>{$lang->user_id}</option>
		<!--option value="user_name" <!--@if($search_target=='user_name')-->selected="selected"<!--@end-->>{$lang->user_name}</option-->
		<option value="nick_name" <!--@if($search_target=='nick_name')-->selected="selected"<!--@end-->>{$lang->nick_name}</option>
        </select>
        <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
        <span class="button"><input type="submit" value="{$lang->cmd_search}" /></span>
        <a href="#" onclick="location.href='{getUrl('','type',$type,'act',$act,'module',$module)}';return false;" class="button"><span>{$lang->cmd_cancel}</span></a>
    </fieldset>
</form>

